<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>学生作业详细信息</title>
    <!-- Bootstrap -->
    <link href="<?php echo base_url() . 'application/views/bootstrap/css/bootstrap.min.css' ?>" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default studentinfo">
                    <div class="panel-heading">
                        <h3 class="panel-title">学生作业详细信息</h3>
                    </div>
                    <div class="panel-body">
                        <table class="table table-striped">
                            <tr>
                                <td>
                                    学生姓名
                                </td>
                                <td>
                                    <?php echo $info[0]['stuname'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    学号
                                </td>
                                <td>
                                    <?php echo $info[0]['stunumber'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    作业地址
                                </td>
                                <td>
                                    <?php echo $info[0]['stuurl'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    仓库托管站点
                                </td>
                                <td>
                                    <?php echo $info['userrepo']['site'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    用户名
                                </td>
                                <td>
                                    <?php echo $info['userrepo']['username'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    仓库名
                                </td>
                                <td>
                                    <?php echo $info['userrepo']['repo'] ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    作业总提交次数
                                </td>
                                <td>
                                    <?php echo count($info['totalcommits']);
                                    $total = 0; ?>
                                </td>
                            </tr>
                            <?php foreach ($info['weekly'] as $line_num => $line): ?>
                            <tr>
                                <td>
                                    第
                                    <?php echo $line_num+1 ?> 周共提交
                                    <?php echo $line ?> 次，
                                </td>
                                <td>
                                    获得
                                    <?php
                                     echo round(($line?(100/18):0),1);
                                     $total = $total + round(($line?(100/18):0),1);
                                     ?> 点
                                </td>
                            </tr>
                            <?php endforeach;?>
                            <tr>
                                <td>平时成绩：</td>
                                <td>
                                    <?php echo $total ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<?php echo base_url('application/views/bootstrap/js/bootstrap.min.js') ?>"></script>
    <script src="<?php echo base_url('application/views/layer/layer.js') ?>"></script>
</body>

</html>